<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="">个人信息</a></li>
			<li><a href="{:url('password')}">密码修改</a></li>
		</ul>
		<form class="form-horizontal js-ajax-form margin-top-20" role="form" method="post" action="{:url('setting')}">
			<div class="form-group">
				<label for="input-user-nickname" class="col-sm-2 control-label">姓名</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-user-nickname" readonly value="{$user.user_nickname}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-phone" class="col-sm-2 control-label">手机号</label>
				<div class="col-md-6 col-sm-10">
					<input type="tel" class="form-control" style="width:300px;float:left" id="input-phone" name="mobile" value="{$user.mobile}" readonly >
					<a href="javascript:showcode()" style="float:left;line-height: 34px;margin: 0 10px;">修改手机号</a>
				</div>
			</div>
			<div class="form-group code" style="display:none;">
				<label for="input-code" class="col-sm-2 control-label">验证码</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" name="code" id="input-code" placeholder="请输入短信验证码" class="form-control"style="width:200px;float:left" required>
					<a class="btn btn-success js-get-mobile-code"
					style="width: 163px;float:left;"
					data-wait-msg="[second]秒后才能再次获取" data-mobile-input="#input-phone"
					data-url="<?php echo url('user/VerificationCode/send'); ?>"
					data-init-second-left="60">获取手机验证码</a>
				</div>
			</div>
			<div class="form-group">
				<label for="input-email" class="col-sm-2 control-label">邮箱</label>
				<div class="col-md-6 col-sm-10">
					<input type="email" class="form-control" id="input-email" value="{$user.user_email}" readonly>
				</div>
			</div>
			<div class="form-group">
				<label for="input-more[wxcode]" class="col-sm-2 control-label">微信号</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-more[wxcode]" name="more[wxcode]" value="{$user.more.wxcode}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-more[address]" class="col-sm-2 control-label">地址</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-more[address]" name="more[address]" value="{$user.more.address}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-sex" class="col-sm-2 control-label">性别</label>
				<div class="col-md-6 col-sm-10">
					<select class="form-control" name="sex" id="input-sex">
						<option value="0" <eq name="user.sex" value="0">selected</eq> >保密</option>
						<option value="1" <eq name="user.sex" value="1">selected</eq> >男</option>
						<option value="2" <eq name="user.sex" value="2">selected</eq> >女</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label for="input-birthday" class="col-sm-2 control-label">出生年月</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control js-bootstrap-date" id="input-birthday" name="birthday" value="{:date('Y-m-d',$user.birthday)}" placeholder="2013-01-04">
				</div>
			</div>
			<div class="form-group">
				<label for="input-signature" class="col-sm-2 control-label">个性签名</label>
				<div class="col-md-6 col-sm-10">
					<textarea class="form-control" id="input-signature" name="signature" placeholder="">{$user.signature}</textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script src="__STATIC__/js/frontend.js"></script>
<script>
    function showcode(){
        $('#input-phone').attr('readonly',false);
		$('.code').show();
	}
</script>
</body>
</html>